package com.zmm.zebulon.module.trade.biz.dal.vo.cart;

import com.zmm.zebulon.module.trade.biz.dal.vo.base.sku.AppProductSkuBaseRespVO;
import com.zmm.zebulon.module.trade.biz.dal.vo.base.spu.AppProductSpuBaseRespVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * description: TODO
 *
 * @author zebulon
 * package com.zmm.zebulon.module.trade.biz.dal.vo.cart
 * name: AppCartListRespVO
 * date 2025/8/31 16:03
 */
@Schema(description = "用户 App - 用户的购物列表 Response VO")
@Data
@Accessors(chain = true)
public class AppCartListRespVO {

    /**
     * 有效的购物项数组
     */
    private List<Cart> validList;

    /**
     * 无效的购物项数组
     */
    private List<Cart> invalidList;

    @Schema(description = "购物项")
    @Data
    @Accessors(chain = true)
    public static class Cart {

        @Schema(description = "购物项的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
        private Long id;

        @Schema(description = "商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Integer count;

        @Schema(description = "是否选中", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
        private Boolean selected;

        /**
         * 商品 SPU
         */
        private AppProductSpuBaseRespVO spu;
        /**
         * 商品 SKU
         */
        private AppProductSkuBaseRespVO sku;

    }

}
